package by.grsu.mikhailava.page.tutor;

import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.markup.html.form.Form;
import org.apache.wicket.markup.html.link.Link;
import org.apache.wicket.markup.html.basic.Label;

import by.grsu.mikhailava.entity.User;
import by.grsu.mikhailava.page.MyFirstWebPage;

public class TutorPage extends WebPage{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 7055408057004018171L;

	@SuppressWarnings({ "rawtypes", "serial" })
	public TutorPage(User user){
		
		super();
		
		final User user1 = user;
		final Form form = new Form("form");
		add(form);
		
		form.add(new Label("firstName", user.getFirstName()));
		form.add(new Label("surName", user.getSurName()));
		
		form.add(new Link("subjects") {
			@Override
			public void onClick() {
				setResponsePage(new TutorSubjectsPage(user1));

			}
		}); 
		
		
		
		
		
		
		form.add(new Link("cancel") {
			@Override
			public void onClick() {
				setResponsePage(MyFirstWebPage.class);
			}
		});
	
	}

}
